home *** CD-ROM | disk | FTP | other *** search
- package javax.swing.plaf.basic;
-
- import java.awt.event.ActionEvent;
- import javax.swing.AbstractAction;
- import javax.swing.tree.TreePath;
-
- class BasicTreeUI$TreeAddSelectionAction extends AbstractAction {
- // $FF: synthetic field
- private final BasicTreeUI this$0;
- private boolean changeAnchor;
-
- public BasicTreeUI$TreeAddSelectionAction(BasicTreeUI var1, String var2, boolean var3) {
- this.this$0 = var1;
- this.changeAnchor = var3;
- }
-
- public void actionPerformed(ActionEvent var1) {
- int var2 = this.this$0.getRowCount(this.this$0.tree);
- if (this.this$0.tree != null && var2 > 0) {
- int var3 = BasicTreeUI.access$5(this.this$0);
- TreePath var4 = BasicTreeUI.access$9(this.this$0);
- TreePath var5 = BasicTreeUI.access$4(this.this$0);
- if (var3 == -1) {
- var3 = 0;
- }
-
- if (!this.changeAnchor) {
- if (this.this$0.tree.isRowSelected(var3)) {
- this.this$0.tree.removeSelectionRow(var3);
- BasicTreeUI.access$3(this.this$0, var5);
- } else {
- this.this$0.tree.addSelectionRow(var3);
- }
-
- BasicTreeUI.access$2(this.this$0, var4);
- } else {
- this.this$0.tree.setSelectionRow(var3);
- }
- }
-
- }
-
- public boolean isEnabled() {
- return this.this$0.tree != null && this.this$0.tree.isEnabled();
- }
- }
-